# -*- coding: utf-8 -*-
"""
Created on Thu Jul 29 14:04:28 2021

@author: A3162
"""
import pandas as pd

path = 'D:\工作\疫情数据\20220226\通管局\待处理.xlsx'  # 目标文件
name = ''  # 输出文件名
outPath = 'D:/Documents/工作/疫情数据/民航/20211222/新建文件夹/'  # 输出文件夹
df1 = pd.read_excel(path, header=0)
nodeDataList = list(df1.groupby(['到达城市']))
for nodeData in nodeDataList:
    print(str(nodeData[0]) + "----数据处理中")
    nodeData[1].to_excel(outPath + str(nodeData[0]) + name + '.xlsx',
                         sheet_name=nodeData[0], index=False)
